#include<bits/stdc++.h>
using namespace std;
const int N=1e5+2;
int a[N],n,i,b,ans,k,ne;
void f(int x){
    for(int i=x+1;i<=N-1;i++){
        if(a[i]==0)continue;
        if(a[i]>=a[x]){
            ans-=a[x];
            if((a[i]-a[x])>0){
                if(a[i]-a[x]>=k){
                    ans-=k;
                    k=0;
                }
                else{
                    ans-=(a[i]-a[x]);
                    k-=(a[i]-a[x]);
                }
            }
        }
        else{
            ans-=a[i];
            k+=(a[x]-a[i]);
        }
        f(i);
        return;
    }
}
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(i=1;i<=n;i++){
        scanf("%d",&b);
        a[b]++;
    }
    ans=n;
    for(i=1;i<=N-1;i++){
        if(a[i]>0){
            f(i);
            break;
        }
    }
    printf("%d",ans);
    return 0;
}
